{extend name="public:adminbase" /}

{block name="content"}


<div class="container-fluid p-t-15">
  
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-header">
          <h4>访问日志</h4>
        </div>
        <div class="card-toolbar clearfix">

          <div class="toolbar-btn-action">
            用户您好，系统已经自动为您屏蔽ip为111.21.172.242的一切访问记录。
          </div>
        </div>
        <div class="card-body">
          
          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                  <th>
                    <label class="lyear-checkbox checkbox-primary">
                      <input type="checkbox" id="check-all"><span></span>
                    </label>
                  </th>
                  <th>编号</th>
                  <th>IP</th>
                  <th>请求地址</th>
                  <th>代理</th>
                  <th>时间</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                {foreach $list as $v}
                <tr>
                  <td>
                    <label class="lyear-checkbox checkbox-primary">
                      <input type="checkbox" name="ids[]" value="{$v.id}"><span></span>
                    </label>
                  </td>
                  <th>{$v.id}</th>
                  <th>{$v.ip}</th>
                  <th>{$v.request_url}</th>
                  <th>{$v.user_agent}</th>
                  <th>{$v.create_time}</th>
                  <th>
                    <button type="button" class="btn btn-secondary btn-xs dropdown-toggle" >
                      暂不支持
                    </button>
                  </th>
                </tr>
                {/foreach}

              </tbody>
            </table>
          </div>
          {$list|raw}
 
        </div>
      </div>
    </div>
    
  </div>
  
</div>
{include file="public/afooter"}
<script>

  function del(id) {
    layer.confirm('您确定要删除吗？', {
      btn: ['确定','取消'] //按钮
    }, function(){
        var url = "{:url('AdminAdvert/delete')}";
      $.post(url,{id:id},function (e) {
        if(e.code != 200){
          error(e.msg);
        }else {
          success(e.msg);
          location.reload();
        }
      })
    }, function(){
      layer.msg('已取消');
    });
  }
</script>

{/block}